package factory.abstractfactory;

import java.util.concurrent.BlockingDeque;

/**
 * @ClassName ColorFactory
 * @Description TODO
 * @Author leejiliang
 * @DateTime 2021/7/15 10:46
 * @Version 1.0
 */
public class ColorFactory extends AbstractFactory {
	@Override
	Sharp getSharp(String sharp) {
		return null;
	}

	@Override
	Color getColor(String color) {
		if ("red".equalsIgnoreCase(color)) {
			return new Red();
		} else if ("blue".equalsIgnoreCase(color)) {
			return new Blue();
		} else if ("black".equalsIgnoreCase(color)) {
			return new Black();
		} else {
			throw new IllegalArgumentException("不支持的颜色");
		}
	}
}
